<template>
  <div>
    <div class="weekend-title">
      周末去哪儿
    </div>
    <ul class="weekend-list" v-if="list.length">
      <li class="item border-bottom" v-for="item of list" :key="item.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl" :alt="item.title">
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeWeekend',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/mixins.styl'
  .border-bottom
    &:before
      border-width 10px
      border-color #eeeeee
  .weekend-title
    line-height .8rem
    background #eeeeee
    text-indent .2rem
  .item
    overflow hidden
    background #ffffff
    box-sizing border-box
    height auto
    .item-img-wrapper
      overflow hidden
      height 0
      padding-bottom 37.4375%;
      .item-img
        overflow hidden
        display block
        width 100%
    .item-info
      padding: .14rem .2rem .2rem .2rem;
      .item-title
        line-height .48rem
        font-size .28rem
        color #212121
      .item-desc
        line-height .42rem
        font-size .24rem
        color #666666
        ellipsis()
      .item-button
        line-height .44rem
        margin-top .16rem
        background-color #ff9300
        padding 0 .2rem
        border-radius .06rem
        color #ffffff
        font-family "微软雅黑"
</style>
